/**
 * Copyright 2020 Inc.
 **/
package com.myz.cloud.stream.rocketmq.producer.controller;


import org.springframework.cloud.stream.messaging.Source;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author maoyz0621 on 2020/8/17
 * @version v1.0
 */
@RestController
public class RocketMQStreamController {

    // @Resource
    // PollableMessageSource messageSource;
    @Resource
    Source source;

    @GetMapping(value = "/send")
    public String send() {
        source.output().send(MessageBuilder.withPayload("hello ").build());
        return null;
    }


}